﻿using AhCha.Fortunate.Common.Const;
using AhCha.Fortunate.IService.DaMeng;
using AhCha.Fortunate.ModelsDto;
using AhCha.Fortunate.ModelsDto.DaMeng.ApiExceptionLog;
using Microsoft.AspNetCore.Mvc;

namespace AhCha.Fortunate.Api.Controllers.DaMeng
{
    /// <summary>
    /// 接口异常记录
    /// </summary>
    [ApiExplorerSettings(GroupName = SwaggerGroupName.SystemModules)]
    public class ApiExceptionLogController : BaseApiController
    {
        readonly private IApiExceptionLogService _apiExceptionLogSerivicel;

        public ApiExceptionLogController(IApiExceptionLogService apiExceptionLogSerivicel)
        {
            _apiExceptionLogSerivicel = apiExceptionLogSerivicel;
        }


        /// <summary>
        /// 异常记录日志数据
        /// </summary>
        /// <param name="inpput"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<SqlSugarPagedList<ApiExceptionLogOutput>> GetApiExceptionLogPage([FromQuery] QueryApiExceptionLogInpput input)
        {
            return await _apiExceptionLogSerivicel.GetApiExceptionLogPage(input);

        }

    }
}
